;var Users = {
	timerSeconds : 0,
	timerMinutes : 0,
	timerHours : 0,
	
	timerIsOn : true,
	
	//These are the variables to add the new upload field
	idProofUploadFieldIndex : 2,
	addressProofUploadFieldIndex : 2,
	kycCopyUploadFieldIndex : 2,
	transactionUploadFieldIndex : 2,
	practiceUploadFieldIndex : 2,
	scannedUploadFieldIndex : 2,
	
	 /**
	
	
	*holds global view type
	*/
	message: 'loading......',
	
	
	/**
	*shows error message
	*/
       showError: function(message){
	 var title = "Error";
	 jQuery.popup.showError(message,title);
	 return false;
       },
       /**
	*shows success message
	*/     
       showSuccess:function(message){
	var title = "Success";
	jQuery.popup.showSuccess(message,title);
	return false;
       },
       
       /*
	*@method:-confirmActionSytemModulePermission
	*@purpose:-check the boxes of sytem module permission and redirect to the
	*controller
	*@author:- Surabhi Shukla
	*/
	confirmActionSytemModulePermission:function(action){
		
		var checks = document.getElementsByName('systemids[]');
		var clen= checks.length;
		var j=0;
	
		for(var i=0; i< clen; i++){
			if(checks[i].checked ===true){
				j++;
			}
		}
		if(j== 0){
			alert("Please select atleast one record!");
			return false;
		}else{
			if(action=="deny") {
				var confirmAction=", you want to deny permission for the selected modules";
			}
			else {
				var confirmAction=", you want to grant permission for the selected modules";
			} 
			if(confirm("Are you sure"+confirmAction)) {
				if(action=="deny") document.frm.action="/probono/"+"users/updateMultipleModulePermission"+"/deny/";
				else document.frm.action="/probono/"+"users/updateMultipleModulePermission"+"/allow/";
				document.frm.submit();
				return true;
			} else {
				return false;
			}
		}
	
	    },
       
	/*
	*@method:-checkAllSystemmodule
	*@purpose:-check all system module controller
	*@author:- Surabhi Shukla
	*/
	checkAllSystemmodule:function(){
	var chkAll = document.getElementById('checkall');
	    var checks = document.getElementsByName('systemids[]');
	    var clen= checks.length;
	    if(chkAll.checked == true ){
		    for(var i=0; i< clen; i++){
			    checks[i].checked = true ;
		    }
	    }else{
		    for(var i=0; i< clen; i++){
			    checks[i].checked = false ;
		    }
	    }
	},
	
	/*
	*@method:-uncheckSystemModuleId
	*@purpose:-uncheck all system module controller
	*@author:- Surabhi Shukla
	*/
	uncheckSystemModuleId:function(){
		var chkAll = document.getElementById('checkall');
		var checks = document.getElementsByName('systemids[]');
		var clen= checks.length;
		countCheck=0;
		for(var i=0; i< clen; i++) {
			if (checks[i].checked == true) countCheck++;
		}
		if (clen==countCheck) chkAll.checked=true;
		else chkAll.checked=false;
	},
	
	/*
	*@method:-updateDisbursementFeeData
	*@purpose:- It will open the popup box and update the description and amount of
	* disbursement fee data
	*@author:- Surabhi Shukla
	*/
	validateCheckboxChecked:function(){
		var fields = jQuery('input[id="DisbursementWorkOwner"]:checked');
		if (!fields.length) {
		    alert('You must check at least one record!');
		    return false; // The form will *not* submit
		}else{
			return true;
		}

	}
	
    };